tweaks according to the comments of kimkulling