cleaned up small code