added functionality - working now