added some other functions (and forgot to commit till now)