added some functionality and cleaned up