added first version of check functionality