adjust code a little