cleaned up basic functionality