added some checks and tests