Trying callbacks but they are hard to implement.