cleaner code, proper fin