implemented callbacks
callbacks are buggy :(