trying to cleanup some code