fixed undefined method error