hardware implementation