Realized stored procedures

but doesn't tested =)