reorganizing and cleanup