add register fuction to project