fixed a few things and added new features to register