added some controller functionality