trying to develop a complete register feature