this still needs to be cleaned up