implemented proper api