added working functions