added some method validation