done with /reg logic part