cleaned up more functions