cleaned up init functions