major clean-up. might not work though!