implementation of srwaggon's caffeine